//
//  OCRModuleView.m
//  OCRModule
//
//  Created by 鲁利杰 on 2018/1/5.
//  Copyright © 2018年 鲁利杰. All rights reserved.
//

#import "OCRModuleView.h"
#import "OCRModuleViewController.h"

@interface OCRModuleView()
{
    OCRModuleViewController *ocrModuleVC;
}
@end

@implementation OCRModuleView

- (instancetype)initOcrModule:(RCTPromiseResolveBlock)resolve
                       reject:(RCTPromiseRejectBlock)reject
                    imagePath:(NSString *)path {
    if (self = [super init]) {
        
        ocrModuleVC = [[OCRModuleViewController alloc] initOcrVCModule:resolve reject:reject imagePath:path];
        
        UIViewController *rootVC = [UIApplication sharedApplication].keyWindow.rootViewController;
        
        [rootVC addChildViewController:ocrModuleVC];
        
        [self addSubview:ocrModuleVC.view];
        
    }
    return self;
}

- (dispatch_queue_t)methodQueue {
    return dispatch_get_main_queue();
}

@end
